﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ListenToTwitter {
    public class rvtWork {
        Twitterizer.Framework.Twitter twitter;
        bool keepAlive = true;
        int frequency = 10;

        public rvtWork(RunViaTwitter.AccountInfo ai) {            
            if (Twitterizer.Framework.Twitter.VerifyCredentials(ai.User, ai.Pass)) {
                twitter = new Twitterizer.Framework.Twitter(ai.User, ai.Pass);
                this.frequency = ai.Frequency;
            }
        }

        public void Listen() {
            while (keepAlive) {

                System.Threading.Thread.Sleep((60 * 1000)* frequency);
            }
        }


    }
}
